<div class="head">
  <div class="title" title="<%= @html_title %>"><%= truncate @html_title, :length => 13 %></div>
  <div onmouseover = '$("designer_name").className = "auto_complete_text_filed";$("search_designers").show();'
            onmouseout = '$("designer_name").className = "auto_complete_text_filed_l";$("search_designers").hide();'
            onclick='$("designer_name").select();'
     >
      <%= text_field_tag :designer_name, params[:designer_name] || '请输入设计师姓名后点击查询...',
                :size => 50,
                :class => "auto_complete_text_filed_l"
         %>
      <%= link_to_remote '查询',
                :update => :right,
                :frequency => 3,
                :url => designers_url,
                :with => "'&designer_name=' + $F('designer_name')",
                :method => :get,
                :loading => short_loader('designers', :height => 500, :width => 725),
                :html => {
                  :id => :search_designers,
                  :style => 'display:none',
                  :class => :base_i
                }
      %>
      <div id="designers_in_auto_complete" class="auto_complete"></div>
      <%= auto_complete_field 'designer_name',
                :update => 'designers_in_auto_complete',
                :frequency => 1,
                :url => auto_complete_designers_url,
                :method => :get
         %>
  </div>
  <div class="tools">
    <%= link_to_remote '▶创建' ,
              :update => :new_designer,
              :url => new_designer_url(:department_id => params[:department_id]),
              :method => :get,
              :complete => "Effect.BlindDown('new_designer')",
              :html => {
                :class => :base
              }
       %>
    <% if params[:department_id] %>
      <%= link_to '▶打印待发', designers_url(:department_id => params[:department_id], :pay_status => :paying,:format => :print), :class => :base, :target => :_blank  %>
      <%= link_to '▶打印暂缓', designers_url(:department_id => params[:department_id], :pay_status => :paused,:format => :print), :class => :base, :target => :_blank  %>
    <% end %>
  </div>
</div>
<div id="new_designer"></div>
<div id="designers">
  <% @designers.each do |designer| %>
  <div id="designer_<%= designer.id %>">
    <%= render :file => 'designers/designer_in_index.html', :locals => { :designer => designer } %>
  </div>
  <% end  %>
  <% if @designers.empty? %>
  <div class="no_records">查无此人</div>
  <% end %>
</div>

